from teacher import models
from rest_framework import serializers


# Create your models here.

class DepartmentSer(serializers.ModelSerializer):
    class Meta:
            fields='__all__'
            model=models.DepartmentModel
class StaffSer(serializers.ModelSerializer):
    departments=serializers.SerializerMethodField(read_only=True)
    def get_departments(self,obj):
        return obj.department.kind
    class Meta:
        fields = '__all__'
        model = models.StaffModel



